<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>需求</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="dba.setup.html">« 安装/配置</a></li>
      <li style="float: right;"><a href="dba.installation.html">安装 »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="dba.setup.html">安装/配置</a></li>
    <li>需求</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="dba.requirements" class="section">
  <h2 class="title">需求</h2>
  <p class="para">
   The behaviour of various aspects depends on the implementation of the
   underlying database. Functions such as <span class="function"><a href="function.dba-optimize.html" class="function">dba_optimize()</a></span>
   and <span class="function"><a href="function.dba-sync.html" class="function">dba_sync()</a></span> will do what they promise for one
   database and will do nothing for others. You have to download and install
   supported dba-Handlers.
   <table class="doctable table">
    <caption><strong>List of DBA handlers</strong></caption>
    
     <thead>
      <tr>
       <th>Handler</th>
       <th>Notes</th>
      </tr>

     </thead>

     <tbody class="tbody">
      <tr>
       <td><code class="literal">dbm</code></td>
       <td>
        Dbm is the oldest (original) type of Berkeley DB style
        databases. You should avoid it, if possible. We do not support
        the compatibility functions built into DB2 and gdbm, because
        they are only compatible on the source code level, but cannot
        handle the original dbm format.
       </td>
      </tr>

      
      <tr>
       <td><code class="literal">ndbm</code></td>
       <td>
        Ndbm is a newer type and more flexible than dbm. It still has
        most of the arbitrary limits of dbm (therefore it is
        deprecated).
       </td>
      </tr>

      
      <tr>
       <td><code class="literal">gdbm</code></td>
       <td>
        Gdbm is the <a href="https://ftp.gnu.org/pub/gnu/gdbm/" class="link external">&raquo;&nbsp;GNU database
        manager</a>.
       </td>
      </tr>

      
      <tr>
       <td><code class="literal">db2</code></td>
       <td>
        DB2 is for <a href="http://www.sleepycat.com/" class="link external">&raquo;&nbsp;Oracle Berkeley
        DB 2</a>. It is described as &quot;a programmatic toolkit that
        provides high-performance built-in database support for both
        standalone and client/server applications.&quot;
       </td>
      </tr>

      
      <tr>
       <td><code class="literal">db3</code></td>
       <td>
        DB3 is for <a href="http://www.sleepycat.com/" class="link external">&raquo;&nbsp;Oracle Berkeley DB
        3</a>.
       </td>
      </tr>

      
      <tr>
       <td><code class="literal">db4</code></td>
       <td>
        DB4 is for <a href="http://www.sleepycat.com/" class="link external">&raquo;&nbsp;Oracle Berkeley DB
        4 or 5</a>. This option can
        be used with BDB 5 as of PHP 5.3.3.
       </td>
      </tr>

      
      <tr>
       <td><code class="literal">cdb</code></td>
       <td>
        Cdb is &quot;a fast, reliable, lightweight package for creating and
        reading constant databases.&quot; It is from the author of qmail and
        can be found at <a href="http://cr.yp.to/cdb.html" class="link external">&raquo;&nbsp;http://cr.yp.to/cdb.html</a>. Since it is
        constant, we support only reading operations.
        We support writing (not updating) through the internal cdb library.
       </td>
      </tr>

      
      <tr>
       <td><code class="literal">cdb_make</code></td>
       <td>
        We support creation (not updating) of cdb files 
        when the bundled cdb library is used.
       </td>
      </tr>

      
      <tr>
       <td><code class="literal">flatfile</code></td>
       <td>
        This is available for compatibility with the deprecated
        <code class="literal">dbm</code> extension only and should be avoided. 
        However you may use this where files were created in this format. That
        happens when configure could not find any external library.
       </td>
      </tr>

      
      <tr>
       <td><code class="literal">inifile</code></td>
       <td>
        This is available to be able to modify php.ini files 
        from within PHP scripts. When working with ini files you can pass arrays 
        of the form array(0=&gt;group,1=&gt;value_name) or strings of the form 
        &quot;[group]value_name&quot; where group is optional. As the functions 
        <span class="function"><a href="function.dba-firstkey.html" class="function">dba_firstkey()</a></span> and <span class="function"><a href="function.dba-nextkey.html" class="function">dba_nextkey()</a></span>
        return string representations of the key there is the function
        <span class="function"><a href="function.dba-key-split.html" class="function">dba_key_split()</a></span> which allows
        to convert the string keys into array keys without loosing <strong><code>false</code></strong>.
       </td>
      </tr>

      
      <tr>
       <td><code class="literal">qdbm</code></td>
       <td>
        The qdbm library can be downloaded from
        <a href="http://fallabs.com/qdbm/index.html" class="link external">&raquo;&nbsp;http://fallabs.com/qdbm/index.html</a>.
       </td>
      </tr>


      <tr>
       <td><code class="literal">tcadb</code></td>
       <td>
        The Tokyo Cabinet library can be 
        downloaded from <a href="http://fallabs.com/tokyocabinet/" class="link external">&raquo;&nbsp;http://fallabs.com/tokyocabinet/</a>.
       </td>
      </tr>


      <tr>
       <td><code class="literal">lmdb</code></td>
       <td>
        This is available since PHP 7.2.0. The Lightning Memory-Mapped Database library 
        can be downloaded from <a href="https://symas.com/lmdb/" class="link external">&raquo;&nbsp;https://symas.com/lmdb/</a>.
       </td>
      </tr>

      
     </tbody>
    
   </table>

  </p>
  <p class="para">
   When invoking the <span class="function"><a href="function.dba-open.html" class="function">dba_open()</a></span> or
   <span class="function"><a href="function.dba-popen.html" class="function">dba_popen()</a></span> functions, one of the
   handler names must be supplied as an argument. The actually
   available list of handlers is displayed by invoking
   <span class="function"><a href="function.phpinfo.html" class="function">phpinfo()</a></span> or <span class="function"><a href="function.dba-handlers.html" class="function">dba_handlers()</a></span>.
  </p>
 </div></div></div></body></html>